﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Collections;


namespace DMSClient
{
    public partial class Quota : Form
    {
        public Quota()
        {
            InitializeComponent();
        }

        private void iBtnDistributor_Click(object sender, EventArgs e)
        {
            try
            {
                //QuotaService.IQuotaClient QuotaSrv = new DMSClient.QuotaServices.IQuotaClient();


                //iGrvQuota.DataSource=QuotaSrv.QuotaByDistributor(iTxtDistributor.Text.Trim());
                //iGrvQuota.DataBind();
                //FormatiGrvQuota();
            }
            catch (Exception)
            {

                throw;
            }
        }
        private void FormatiGrvQuota()
        {
            try
            {
                iGrvQuota.DisplayLayout.Override.AllowRowFiltering = Infragistics.Win.DefaultableBoolean.True;
                iGrvQuota.DisplayLayout.GroupByBox.Prompt = "Arrastra aquí alguna cabecera para agrupar por ella";
                iGrvQuota.DisplayLayout.Override.RowSelectorHeaderStyle = Infragistics.Win.UltraWinGrid.RowSelectorHeaderStyle.ColumnChooserButton;
                iGrvQuota.DisplayLayout.Override.RowSelectors = Infragistics.Win.DefaultableBoolean.True;

                iGrvQuota.DisplayLayout.Bands[0].Columns["cdQuota"].Hidden = true;

                iGrvQuota.DisplayLayout.Bands[0].Columns["cdQuota"].Header.Caption = "cdQuota";

                iGrvQuota.DisplayLayout.Bands[0].Columns["cdOrgUnit"].Hidden = true;
                iGrvQuota.DisplayLayout.Bands[0].Columns["cdOrgUnit"].Header.Caption = "cdOrgUnit";

                iGrvQuota.DisplayLayout.Bands[0].Columns["cdRegion"].Hidden = true;
                iGrvQuota.DisplayLayout.Bands[0].Columns["cdRegion"].Header.Caption = "cdRegion";

                iGrvQuota.DisplayLayout.Bands[0].Columns["cdStoreClassif"].Hidden = true;
                iGrvQuota.DisplayLayout.Bands[0].Columns["cdStoreClassif"].Header.Caption = "cdStoreClassif";

                iGrvQuota.DisplayLayout.Bands[0].Columns["cdProductClassif"].Hidden = true;
                iGrvQuota.DisplayLayout.Bands[0].Columns["cdProductClassif"].Header.Caption = "cdProductClassif";

                iGrvQuota.DisplayLayout.Bands[0].Columns["cdProduct"].Hidden = true;
                iGrvQuota.DisplayLayout.Bands[0].Columns["cdProduct"].Header.Caption = "cdProduct";

                iGrvQuota.DisplayLayout.Bands[0].Columns["vlQuota1"].Hidden = true;
                iGrvQuota.DisplayLayout.Bands[0].Columns["vlQuota1"].Header.Caption = "vlQuota1";

                iGrvQuota.DisplayLayout.Bands[0].Columns["vlQuota2"].Hidden = true;
                iGrvQuota.DisplayLayout.Bands[0].Columns["vlQuota2"].Header.Caption = "vlQuota2";

                iGrvQuota.DisplayLayout.Bands[0].Columns["vlQuota3"].Hidden = true;
                iGrvQuota.DisplayLayout.Bands[0].Columns["vlQuota3"].Header.Caption = "vlQuota3";

                iGrvQuota.DisplayLayout.Bands[0].Columns["dtMonthYear"].Hidden = true;
                iGrvQuota.DisplayLayout.Bands[0].Columns["dtMonthYear"].Header.Caption = "dtMonthYear";

                iGrvQuota.DisplayLayout.Bands[0].Columns["cdStatus"].Hidden = true;
                iGrvQuota.DisplayLayout.Bands[0].Columns["cdStatus"].Header.Caption = "cdStatus";
 
            }
            catch (Exception)
            {
                
                throw;
            }


       } 
    }
}
